package com.app.utils.impl.labour;

import android.text.TextUtils;

import com.app.utils.impl.IConsole;
import com.app.utils.impl.Strategy;
import com.zndroid.utils.XUtils;
import com.zndroid.utils.impl.ClipboardUtil;

/**
 * Created by lzy on 2022/2/21.
 */
public class ClipboardUtilStrategy extends Strategy {
    public ClipboardUtilStrategy(IConsole iConsole) {
        super(iConsole);
    }

    @Override
    public void doing() {
        ClipboardUtil util = XUtils.create().clipboardUtil();

        iConsole.console("copyText(‘我是将要复制到剪切板上的内容’)", "done");util.copyText("我是将要复制到剪切板上的内容");
        iConsole.console("getText", "来自剪切板的内容：" + (TextUtils.isEmpty(util.getText()) ? "null" : util.getText().toString()));
        iConsole.console("getUri", util.getUri() == null ? "null" : util.getUri().toString());
    }
}
